package com.dd;

import com.dd.config.SpringConfig;
import com.dd.service.StuService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );

        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
//        StuDao stuDao = ctx.getBean(StuDao.class);
//        stuDao.getList();
//        stuDao.save();

        StuService stuService = ctx.getBean(StuService.class);
        stuService.getList();
        stuService.save();
    }
}
